package garbage;

import org.eclipse.jdt.core.dom.ASTNode;

public class ASTParentSearcher {
	
	private ASTParentSearcher() {}

	public static ASTNode find(ASTNode node, int parentType) {
		ASTNode parentClass = node.getParent();
		while (parentClass.getNodeType() != parentType/*ASTNode.TYPE_DECLARATION*/)
			parentClass = parentClass.getParent();
		return parentClass;
	}
}
